export const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import('../views/frontend/index/index.vue'),
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('../views/frontend/index/Home.vue'),
      },
      {
        path: '/second-handHouse',
        name: 'Second-handHouse',
        component: () => import('../views/frontend/esf/Second-handHouse.vue')
      },

      {
        path: '/house_detail/:id',
        name: 'house_detail',
        component: () => import('../views/frontend/esf/house_detail.vue')
      },

      // {
      //   path: '/renting',
      //   name:'Renting',
      //   component: () => import('../views/frontend/Renting.vue')
      // },

      {
        path: '/estate',
        name: 'Estate',
        component: () => import('../views/frontend/estate/Estate.vue')
      },
      {
        path: '/estate_detail/:id',
        name: 'estate_detail',
        component: () => import('../views/frontend/estate/estate_detail.vue')
      },

      // {
      //   path: '/school',
      //   name:'School',
      //   component: () => import('../views/frontend/School.vue')
      // },

      {
        path: '/agent',
        name: 'Agent',
        component: () => import('../views/frontend/agent/Agent.vue')
      },
      {
        path: '/agent_detail/:id',
        name: 'agent_detail',
        component: () => import('../views/frontend/agent/agent_detail.vue')
      },
      {
        path: '/sellingHouse',
        name: 'SellingHouse',
        component: () => import('../views/frontend/SellingHouse.vue')
      },

      // {
      //   path: '/guide',
      //   name:'Guide',
      //   component: () => import('../views/frontend/Guide.vue')
      // },

      // {
      //   path: '/about',
      //   name:'About',
      //   component: () => import('../views/frontend/About.vue')
      // },

      {
        path: '/login',
        name: 'Login',
        component: () => import('../views/frontend/login/Login.vue')
      },

      {
        path: '/register',
        name: 'Register',
        component: () => import('../views/frontend/login/Register.vue')
      },

      {
        path: '/personal',
        name: 'Personal',
        redirect: {
          name: 'personalHome'
        },
        // alias: '/',
        component: () => import('../views/frontend/personal/Personal.vue'),
        children: [{
          path: "/personalHome",
          name: "personalHome",
          alias: '/',
          component: () => import('../views/frontend/personal/personalHome.vue')
        }, {
          path: "/sellingRecord",
          name: "sellingRecord",
          component: () => import('../views/frontend/personal/sellingRecord.vue')
        }, {
          path: "/appointmentRecord",
          name: "appointmentRecord",
          component: () => import('../views/frontend/personal/appointmentRecord.vue')
        },
        // {
        //   path: "/collectionRecord",
        //   name: "collectionRecord",
        //   component: () => import('../views/frontend/personal/collectionRecord.vue')
        // },
        {
          path: "/transactionProgress",
          name: "transactionProgress",
          component: () => import('../views/frontend/personal/transactionProgress.vue')
        }]
      },
    ]
  },



  // 后台路径
  {
    path: '/backstage/register',
    name: 'B_Register',
    component: () => import('../views/backstage/B_Register.vue')
  },

  {
    path: '/backstage/admin',
    name: 'B_Login',
    component: () => import('../views/backstage/B_Login.vue')
  },
  
  {
    path: '/backstage/Main',
    name: 'B_Main',
    redirect: { name: 'B_HouseList' },
    component: () => import('../views/backstage/index/B_Main.vue'),
    children: [
      // {
      //   path: '/backstage/home',
      //   name:'B_Home',
      //   component: () => import('../views/backstage/index/B_Home.vue')
      // },
      {
        path: '/backstage/PostHouse',
        name: 'B_PostHouse',
        component: () => import('../views/backstage/house/B_PostHouse.vue')
      },
      {
        path: '/backstage/HouseList',
        name: 'B_HouseList',
        component: () => import('../views/backstage/house/B_HouseList.vue')
      },
      {
        path: '/backstage/CheckHouse',
        name: 'B_CheckHouse',
        component: () => import('../views/backstage/house/B_CheckHouse.vue')
      },
      {
        path: '/backstage/Estate',
        name: 'B_Estate',
        component: () => import('../views/backstage/house/B_Estate.vue')
      },
      {
        path: '/backstage/userList',
        name: 'userList',
        component: () => import('../views/backstage/user/userList.vue')
      },
      {
        path: '/backstage/agentList',
        name: 'agentList',
        component: () => import('../views/backstage/user/agentList.vue')
      },
      {
        path: '/backstage/adminList',
        name: 'adminList',
        component: () => import('../views/backstage/admin/adminList.vue')
      },
    ]
  },

  // 

  {
    path: '*',
    // redirect: {
    //   name: 'Home'
    // }
  }


]